package controller;

import java.util.HashMap;
import java.util.Map;
import javax.servlet.http.HttpSession;
import javax.servlet.http.HttpSessionEvent;
import javax.servlet.http.HttpSessionListener;
import model.Product;
import model.User;

/**
 *
 * @author Sergio
 */
public class StartUpSessionListener implements HttpSessionListener{

    public void sessionCreated(HttpSessionEvent se) {
        HttpSession s = se.getSession();
        Map<String,Product> carro = new HashMap<String,Product>();
        User usuario = new User();
        s.setAttribute("carrito", carro);
        s.setAttribute("usuario",usuario);
    }

    public void sessionDestroyed(HttpSessionEvent se) {

    }

}
